/*            Copyright(c) 2006-2008 Dave Sexton           *
 * http://www.codeplex.com/DocProject                      *
 * http://www.codeplex.com/DocProject/Project/License.aspx *
 ***********************************************************/
using System;
using System.Collections.Generic;
using System.Text;
using System.Xml;

namespace DaveSexton.DocProject.Sandcastle.ContentManagement
{
	public sealed class XmlCommentTopic : IXmlTopic
	{
		#region Public Properties
		#endregion

		#region Private / Protected
		private readonly CommentsMember member;
		#endregion

		#region Constructors
		/// <summary>
		/// Constructs a new instance of the <see cref="XmlCommentTopic" /> class.
		/// </summary>
		public XmlCommentTopic(CommentsMember member)
		{
			if (member == null)
				throw new ArgumentNullException("member");

			this.member = member;
		}
		#endregion

		#region IXmlTopic Members
		public bool CanCreateSection
		{
			get
			{
				return true;
			}
		}

		public void NotifySectionChanged(string section)
		{
			member.NotifySectionChanged(section);
		}

		public XmlElement CreateSection(string section)
		{
			return member.CreateSection(section);
		}
		#endregion
	}
}
